home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 23.zip / BS1 part 23 / Prof page II type.adf / Install / DiskMount < prev    next >
AmigaDOS Script File  |  1990-08-10  |  1KB  |  53 lines

  1. .KEY english/A,check/A,asn/A,dest
  2. .BRA {
  3. .KET }
  4.  
  5. ; DiskMount - Ask user for a diskette.
  6. ;
  7. ; Asks the user to put a given diskette into {dest}, and then gives it
  8. ; a name which won't conflict with any standard assignments.
  9. ;
  10. ; Inputs:
  11. ;   english  What to ask the user for
  12. ;   check    The volume name the diskette must have
  13. ;   asn      The Assign name to give it
  14.  
  15. ; If we already know how to find the requested disk, don't specifically
  16. ; ask for it again in {dest}.
  17. ; Use ASSIGN EXISTS because we only care whether the name is known, not
  18. ; whether the diskette is accessible at the moment (if it isn't a DOS
  19. ; requester will remedy the situation).
  20.  
  21. assign >NIL: {asn} exists
  22. if not warn
  23.     skip MountOK
  24. endif
  25.  
  26. lab volagain
  27.  
  28. echo "Please insert {english}" noline
  29. echo " into drive *E[;1m{dest$DF0:}*E[m.*NHit RETURN when ready, or N to abort:  " noline
  30. instutil ask ""
  31. if warn
  32.     skip MountAbort
  33. endif
  34.  
  35. assign PSInstVCheck: ""
  36. cd "{dest$DF0:}"
  37. cd >GD_TempDir:VolumeCheck
  38. cd PSInstVCheck:
  39. assign PSInstVCheck:
  40.  
  41. instutil -eGDIVolCheck join GD_TempDir:VolumeCheck
  42. if not $GDIVolCheck eq {check}
  43.     echo "*NWrong disk.  Try again."
  44.     skip back volagain
  45. endif
  46.  
  47. assign {asn} "{dest$DF0:}"    ; Hook we can use when disk has been removed
  48. skip MountOK
  49.  
  50. lab MountAbort
  51.  
  52. lab MountOK
  53.